<li id="p-<?php echo $data->id; ?>">
    <table class="product-items">
        <tbody>
        <tr class="odd xtable-data-row">
            <td align="center" class="product-checkbox-column" width="10"><input value="<?php echo $data->id; ?>"
                                                                                 class="select-on-check" type="checkbox"
                                                                                 name="item" id="item"></td>
            <td>
                <?php echo CHtml::link($data->name, '#', array('class' => $data->subProductCount ? 'toggle' : '','id'=>$data->id,'name'=>$data->name)); ?>
                <?php if ($data->subProductCount): ?>
                    <span class="badge badge-info"><?php echo $data->subProductCount; ?></span>
                <?php endif; ?>
            </td>
            <td width="200">
                <?php echo CHtml::link($data->custom_url, app()->request->hostInfo . '/' . trim($data->custom_url, '/'), array('target' => '_blank')); ?>
            </td>
            <td width="150">
                <?php echo implode(",", array_keys($data->categories(array("index" => "title")))); ?>
            </td>
            <td width="100">
                <?php echo CHtml::image($data->getProductItems(true), $data->name, array('class' => 'img-polaroid', 'style' => 'width:100px;height:100px;')); ?>
            </td>
            <td width="100">
                <?php
                    $subproduct = SubProduct::model()->findByPk($data->sub_default);
                    if(is_object($subproduct)){
                        echo $subproduct->sku;
                    }
                ?>
            </td>
            <td class="product-status-column" width="100" style="text-align: center">
                <?php echo CHtml::link($data->status ? "<i class='icon-ok'></i>" : "<i class='icon-ban-circle'></i>", array("/Xpress/service/ajax", "SID" => "Shop.Product.changeStatus", "ids[]" => $data->id, "value" => $data->status ? 0 : 1), array("class" => ($data->status ? "active" : ""))); ?>
            </td>
            <td width="50" class="product-actions-column actions-column">
                <?php echo CHtml::link('<i class="icon-pencil"></i>', array('update', 'id' => $data->id), array('class' => 'xtarget-detail')); ?>
                <?php echo CHtml::link('<i class="icon-eye-open"></i>', Yii::app()->controller->previewUrl($data), array('class' => 'preview', 'title' => 'Preview', 'target' => '_blank')); ?>
                <?php echo CHtml::link('<i class="icon-trash"></i>', array('delete', 'id' => $data->id), array('class' => 'delete')); ?>
            </td>
        </tr>
        </tbody>
    </table>
    <!--    <ul>-->
    <!--        <li class="sortable" id="items-424">-->
    <!--            --><?php
    //            $subProduct = new SubProduct();
    //            $subProduct->product_id = $data->id;
    //            $this->renderPartial('_subproduct_admin', array('model'=>$subProduct, 'lazyLoad'=>true));
    ?>
    <!--        </li>-->
    <!--    </ul>-->
</li>